import "./App.scss";
import { Route, HashRouter, Switch, Redirect } from "react-router-dom";
import { layoutComponents } from "@/utils/require.Context.component";
import Main from "@/layout/main/Main";
function App() {
    return (
        <div className="App">
            <HashRouter>
                <Switch>
                    <Route exact path="/" render={() => <Redirect to="/main" />} />
                    <Route path="/main" component={Main} />
                    {layoutComponents.map(({ path, component, name }) => {
                        if (name != "Main") return <Route exact path={path} component={component} key={path} />;
                    })}
                </Switch>
            </HashRouter>
        </div>
    );
}

export default App;
